// Flutter imports:
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

// Package imports:
import 'package:get/get.dart';

Widget buildDataBackDialog({required String str, required Function onPress}) {
  return Material(
    color: Colors.transparent,
    child: CupertinoAlertDialog(
      title: Center(
        child: Text("notice".tr),
      ),
      content: Center(
        child: Text(str),
      ),
      actions: [
        CupertinoButton(
            child: Text("cancel".tr),
            onPressed: () {
              Get.back();
            }),
        CupertinoButton(
            child: Text("confirm".tr),
            onPressed: () {
              Get.back();
              onPress();
            })
      ],
    ),
  );
}
